home *** CD-ROM | disk | FTP | other *** search
/ More MacCube 1: Arcade Games / More MacCube Vol 1 Arcade Games.bin / Games⁄Arcade / Bolo / More information / Sample Code / Std Autopilot / Brain changes for 0.99.6 < prev    next >
Encoding:
Text File  |  1995-05-13  |  3.6 KB  |  86 lines  |  [TEXT/KAHL]

  1. The following changes to the Brain interface have been made in Bolo 0.99.6:
  2.  
  3.  
  4. 1. Bug fixes
  5.  
  6. These changes apply to existing version 2 Brains as well as new version 3
  7. ones.
  8.  
  9. • Brains no longer get told about the location of all refuelling bases,
  10. unless the game initiator sets the "Give Brains an advantage" option, in
  11. which case the Brains always get told the positions of every tank, pillbox,
  12. and refuelling base. In other words, this is now a deliberate option, not
  13. an accidental mistake.
  14.  
  15. • For refueling bases, the 'direction' value will be zero if the base is dead
  16. and capturable, and non-zero otherwise. Unlike pillboxes, it does not tell
  17. you the exact strength of the base, only a rough approximation, but it is
  18. enough to help you decide when it is time to drive onto the base.
  19.  
  20. • Brains no longer get told about the position of incoming parachutes. In
  21. version 2 they used be reported as OBJECT_BUILDMAN, which is sort-of correct,
  22. but misleading.
  23.  
  24.  
  25. 2. Additional information
  26.  
  27. If a Brain's CODE resource is compiled as 1003, this indicates to Bolo that
  28. it was compiled with the version 3 header file and understands the version 3
  29. extensions. Bolo will still load existing 1002 Brains, but only the bug-fixes
  30. above will apply.
  31.  
  32. If you wish, it is acceptable to publish BBRN files containing both an ID
  33. 1002 and an ID 1003 resource, if you want to maintain backwards compatibility
  34. to old copies of Bolo. Be advised, though, that if you do this, you should
  35. take care to ask people what version of Bolo they are running when they
  36. report bugs to you, or you won't know which version of you Brain they are
  37. complaining about.
  38.  
  39. • New object id: OBJECT_PARACHUTE, used to indicate a new builder parachuting
  40. in.
  41.  
  42. • Pointer to entire visible world, like map overview window.
  43. The array is 256x256 squares, arranged as horizontal rows, top left square
  44. of the map first, bottom right last. squares that have not been seen at
  45. all contain the value TERRAIN_UNKNOWN. Squares that have been seen in the
  46. past contain the value indicating whatever terrain was seen there last.
  47. There are also two flags (in addition to the mine bit). TERRAIN_TANK_VIS
  48. indicates whether the square is currently visible from the tank, and
  49. TERRAIN_PILL_VIS indicates whether the square is currently visible from
  50. one of your pillboxes. These flags tell you whether what you're seeing
  51. is 'live' information, or just the last recorded terrain at that location.
  52.  
  53. • GAMEINFO structure, giving information about the game options, as is
  54. given to BoloTrackers:
  55.  
  56. typedef struct { u_long machineid; u_long timestamp; } GAMEID;
  57.  
  58. enum { GameType_open=1, GameType_tournament, GameType_strict_tment };
  59.  
  60. #define GAMEINFO_HIDDENMINES 0x80
  61. #define GAMEINFO_ALLMINES_VISIBLE 0xC0
  62.  
  63. typedef struct
  64.     {
  65.     u_char36 mapname;
  66.     GAMEID gameid;
  67.     BYTE gametype;
  68.     BYTE hidden_mines;
  69.     // has the value GAMEINFO_HIDDENMINES or GAMEINFO_ALLMINES_VISIBLE
  70.     BYTE allow_AI;
  71.     BYTE assist_AI;
  72.     long start_delay;
  73.     long time_limit;
  74.     } GAMEINFO;
  75.  
  76. The GAMEINFO structure gives you the information about the options that
  77. the game initiator selected, including the map name. Some Brain writers
  78. have asked for more information, like "a complete copy of the original
  79. map before any changes were made. Well, Bolo doesn't keep around a spare
  80. copy of "the original map before any changes were made" and never has.
  81. If it did, then it would take up extra unnecessary memory space and joining
  82. a game would take twice as long because Bolo would have to send two maps to
  83. you, the current one and the original state. Brain writers are just going
  84. to have to make do with the same information that human players get in this
  85. case -- the name of the map.
  86.